<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>注册时积分规则</title>
<%@include file="../collect/meta.jsp"%>
<link rel="stylesheet" href="css/radius.css" type="text/css"></link>
<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
<style>
	#regScore{
		width:180px;
		font-size: 14px;
	}
	#backMessage{
		font-weight:bold;
		font-size:20px;
		color:red;
		margin-left:-68px;
	}
</style>
</head>
<body lang="zh-cn">
	<div class="wrapper">
		<c:import url="/collect/top.jsp"></c:import>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<c:import url="/collect/left.jsp"></c:import>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i>积分管理</li>
							<li><a href="integralrule!watchEnterpriseIntegralRule">积分规则</a>
							</li>
							<li>注册时赠送积分</li>
						</ul>
						<!-- .breadcrumb -->
					</div>
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<div class="tabbable">
									<ul class="nav nav-tabs" id="myTab">
										<li><a href="integralrule!watchEnterpriseIntegralRule">积分等级</a>
										</li>
										<li class="active"><a href="bGiveRule!entrygiveValue">注册时积分规则</a>
										</li>
										<li><a href="bGiveRule!watchBgiveRule">时间段规则</a>
										</li>
									</ul>
								</div>
								<br>
								<div class="alert alert-success">设定在用户注册时，赠送给用户的积分。若不赠送，可以不设置或设置为0。</div>
								<form action="bGiveRule!setgiveValue" method="post">
									<div align="center">
										<div id="setScore">
											<input type="text" id="regScore" name="regScore"
												value="${fn:substring(bGiveRule.giveValue, 0, fn:indexOf(bGiveRule.giveValue, '.0'))}"
												placeholder="注册时赠送的积分">
											<button type="submit" id="makeScore"
												class="btn btn-primary radius">确认</button>
										</div>
										<%if(request.getParameter("make")!=null){ %>
										<span id="backMessage">设置成功!</span>
										<%} %>
									</div>
								</form>
							</div>
							<!-- /.col -->
						</div>
						<!-- /.row -->
					</div>
					<!-- /.page-content -->
				</div>
				<!-- /.main-content -->
			</div>
			<!-- /.main-container-inner -->
			<a href="#" id="btn-scroll-up"
				class="btn-scroll-up btn btn-sm btn-inverse"
				style="position:fixed;bottom:0;"> <i
				class="icon-double-angle-up icon-only bigger-110"></i> </a>
		</div>
		<!-- /.main-container -->
		<div class="push"></div>
	</div>
	<c:import url="/collect/down.jsp"></c:import>
</body>
<script type="text/javascript">
   	$(document).ready(function(){
            setTimeout("$('#backMessage').hide()",5000);
            
            $("#makeScore").click(function(){
          	  var regScore = $("#regScore").val();
          	  if (!/^\d+$/.test(regScore)) {
        			alert("积分必须是正整数！");
        			return false;
        		}
          	  $(this).submit();
            })
          });
          $('.jifenguanli > ul').show();
	$('.jifenguanli > ul > li > a').eq(0).css("color","red"); 
</script>
</html>
